import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/LoginView.vue'
import IndexView from '../views/IndexView.vue'

import Index from '../views/IndexIndexView.vue'

import Query from '../views/ReceptionQueryView.vue'
import Register from '../views/ReceptionRegisterView.vue'
import Visit from '../views/ReceptionVisitView.vue'
import Bed from '../views/ReceptionBedView.vue'

import Registration from '../views/AssessRegistrationView.vue'
import Evaluation from '../views/AssessEvaluationView.vue'

import Profile from '../views/UserProfileView.vue'
import Admission from '../views/UserAdmissionView.vue'
import Outgoing from '../views/UserOutgoingView.vue'
import Retirement from '../views/UserRetirementView.vue'

import Project from '../views/CareProjectView.vue'
import CareLevel from '../views/CareLevelView.vue'
import CareStaff from '../views/CareStaffView.vue'
import CareRecord from '../views/CareRecordView.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: LoginView
    },
    {
        path:'/index',
        name: 'index',
        component:IndexView,
        children:[
            {
                path: 'index',
                name: 'indexIndex', // 首页
                component: Index,
            },
            {
                path: 'reception-register', 
                name: 'receptionRegister',  // 接待登记
                component: Register,
            },
            {
                path: 'reception-visit',    
                name: 'receptionVisit',  //来访登记
                component: Visit,
            },
            {
                path: 'reception-query',  
                name: 'receptionQuery',  // 老人信息查询
                component: Query,
            },
            {
                path:'reception-bed',
                name:'receptionBed',  //床位查询
                component: Bed,
            },
            {
                path:'assess-registration',
                name:'assessRegistration',  // 能力评估信息登记
                component: Registration,
            },
            {
                path:'assess-evaluation',
                name:'assessEvaluation',  //能力评估
                component: Evaluation,
            },
            {
                path:'user-profile',
                name:'userProfile',  //用户档案
                component: Profile,
            },
            {
                path:'user-admission',
                name:'userAdmission',  //入院登记
                component: Admission,
            },
            {
                path:'user-outgoing',
                name:'userOutgoing',  //外出登记
                component: Outgoing,
            },
            {
                path:'user-retirement',
                name:'userRetirement',  //退住登记
                component: Retirement,
            },
            {
                path:'care-project',
                name:'careProject',  // 服务项目管理
                component: Project,
            },
            {
                path:'care-level',
                name:'careLevel',  // 护理等级
                component: CareLevel,
            },
            {
                path:'care-staff',
                name:'careStaff',  // 护理管理
                component: CareStaff,
            },
            {
                path:'care-record',
                name:'careRecord',  // 护理报表
                component: CareRecord,
            }
        ]
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
